home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_144 / analyticalc / analydocuments.arc / PCSAVFMT.TXT < prev    next >
Text File  |  1987-08-25  |  3KB  |  74 lines

  1.     AnalytiCalc Save File Format
  2.  
  3.     AnalytiCalc's P class commands use a sequential file
  4. which encodes the values in active cells only. This file
  5. may readily be handled in Fortran or other languages.
  6.     The first line is the title (80 characters) followed by
  7. optional matrix relocation and column widths of some of the
  8. leftmost columns. This information varies but is all on the same
  9. line as the title, after the 80 title characters (which are space
  10. padded). Following that are records containing sheet information.
  11.  
  12.     Each cell is output in 2 lines with the following
  13. formats:
  14.     A1,I5,',',I5,',',109A1    (SYMBOLIC SAVE)
  15.  OR    A1,I5,',',I5,',',E50.35 (NUMERIC SAVE)
  16.  and then
  17.     I3,',',9A1,',',I5
  18.  
  19. The numbers encoded in the first format are:
  20. A1    -    Letter P or D indicating Physical or Display sheet save
  21.         (usually ignored). Note: Upper case P will normally
  22.         indicate formula records; lower case p will indicate
  23.         value records. Default save is now a value record followed
  24.         by a formula record for each cell. Programs using
  25.         saved files should either take the first record for
  26.         a cell if using values, or check the case of the
  27.         initial letter. 
  28.     Note:
  29.     Initial letter M is used for mapping information where cell offsets
  30.     are increased by 64000 and the interpretation is that a display
  31.     sheet cell is to receive the physical mapping provided. Formula
  32.     gets the information in this case only. Sheet reader programs should
  33.     ensure that the initial letter is one they recognize or ignore the
  34.     two-line record.
  35.  
  36. I5    -    Row relative to cursor at save time, starting at 1 for
  37.         cursor location and increasing (saves only from cursor
  38.         right and down)
  39. I5    -    Column relative to cursor at save time, starting at 1
  40. 109A1
  41. or    -    Formula in cell, or value in cell (depends on Symbolic
  42. E50.35        or Numeric save which is present)
  43.  
  44. The numbers encoded in the second format are:
  45. I3    -    FVLD - Valid byte. Its meaning is that negative values
  46.         are text (-1 means alphas are present, -2 or -3 mean only
  47.         numerics and/or punctuations), 0 is an inactive cell (should
  48.         never appear in a save), and +1 means formula with alphas,
  49.         +2 or +3 means formula with no alphas (2 or 3 switches whether
  50.         it was computed or not).
  51. 9A1    -    Format string for formatting cell on output
  52. I5    -    Type number. Normally 2 for reals, 4 for integers, negative
  53.         values mean uninitialized. Negative numbers basically
  54.         never will appear here.
  55.  
  56.     The fields are separated by commas so BASIC can handle them.
  57.  
  58.     These numbers may be read by FORTRAN formats as follows:
  59.  
  60. 1000    FORMAT(A1,I5,X,I5,X,109A1) or
  61. 1000    FORMAT(A1,I5,X,I5,X,E50.35)
  62.  
  63. 2000    FORMAT(I3,X,9A1,X,I5)
  64.  
  65.  
  66.     Note this sort of encoding is needed to allow the format
  67. encoding to be recorded in the file; the DIF format lacks room
  68. to do this. On read-back, cells outside legal boundaries are not
  69. used.
  70.     To add pie charts or other graphics, a simple mod to PCGRAF
  71. with addition of suitable graphics output routines for your favorite
  72. graphics device would give such graphics output from AnalytiCalc
  73. saved spread sheets (provided they were saved numerically).
  74.